<script setup>
import {ref, reactive} from 'vue'

const msg = ref("helloworld")

// 这样写会报错
// Uncaught (in promise) TypeError: Assignment to constant variable.
// 未捕获的类型错误：赋值给常量变量。
// msg = "nihao"

// 这样写就可以改变值 
msg.value = "nihao"

console.log(msg)

</script>

<template>
    <span>Message: {{ msg }}</span>
</template>